/* eslint-disable */
import ajax from './ajax';
import API from './apiuri';
const UserApi = API.userApi;

export default {
/* eslint-disable */
  // 登录
  login (data) {
    return ajax({
      url: UserApi.login,
      method: 'POST',
      data: data
    });
  },

  // 添加
  add (data) {
    return ajax({
      url: UserApi.add,
      method: 'POST',
      data: data
    });
  },
  // 编辑
  edit (data) {
    return ajax({
      url: UserApi.edit,
      method: 'PUT',
      data: data
    });
  },
  // 删除
  delete (data) {
    return ajax({
      url: UserApi.delete,
      method: 'DELETE',
      data: data
    });
  },
  // 查全部
  list (data) {
    return ajax({
      url: UserApi.list,
      method: 'POST',
      data: data
    });
  },
  // 查全部
  logout (data) {
    return ajax({
      url: UserApi.logout,
      method: 'POST',
      data: data
    });
  }
};
